package com.hu.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hu.common.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author hu
 * @since 2023-07-27
 */
public interface UserMapper extends BaseMapper<User> {
    List<User> getAllUser();

    /**
     * 用户列表分页查询-mybatis
     * @param user
     * @param orderStatus
     * @param columnName
     * @return
     */
    List<User> queryProperty(User user, Integer orderStatus, String columnName);

    @Select("select username from sys_user where username = #{username}")
    User isRegister(String username);
}
